﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Practice
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public static Dictionary<string, string> armourHero = new Dictionary<string, string>();

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            var uid = textBox1.Text;
            var pwd = textBox2.Text;

            var usr = armourHero.Where(x => x.Key == uid && x.Value == pwd)
                .Select(x => new { key = x.Key, value = x.Value }).FirstOrDefault();
            

            if (usr!=null)
            {
                Picture picture = new Picture();
                picture.Show();
                
            }
            else
            {
                Picture2 picture2 = new Picture2();
                picture2.Show();
                
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            armourHero.Add("management", "2234");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form2 form2 = new Form2();
            form2.Show();

        }
    }
}
